package cn.zero.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.zero.authorize.Authorize;
import cn.zero.service.WalletService;

@RequestMapping("/wallet")
@Controller
public class WalletController extends BaseController {

	String prefix = "wallet/%s";
	
	@Autowired
	private WalletService walletService;
	
	@GetMapping
	public String index(Map<String, Object> map) {
		map.put("wallet", walletService.getByUserId(Authorize.getLoginInfo().getUserId()));
		return formatPage(prefix, "index");
	}
	
}
